Optimal. Leaf size=448 \[ \frac{\tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (d h+3 e g)\right )\right )-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (d h^2-3 e g h+9 f g^2\right )\right )+8 c^2 g^3 (3 f g-e h)\right )}{8 h^4 \left (a h^2-b g h+c g^2\right )^{3/2}}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (f g^2-h (e g-d h)\right )}{2 h (g+h x)^2 \left (a h^2-b g h+c g^2\right )}+\frac{\sqrt{a+b x+c x^2} \left (-2 h x \left (-2 a f h+2 b f g-c d h+c e g-\frac{3 c f g^2}{h}\right )+4 a h (3 f g-e h)-b \left (-d h^2-3 e g h+11 f g^2\right )+\frac{4 c g^2 (3 f g-e h)}{h}\right )}{4 h^2 (g+h x) \left (a h^2-b g h+c g^2\right )}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) (-b f h-2 c e h+6 c f g)}{2 \sqrt{c} h^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.874962, antiderivative size = 446, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1650, 812, 843, 621, 206, 724} \[ \frac{\tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (d h+3 e g)\right )\right )-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (d h^2-3 e g h+9 f g^2\right )\right )+8 c^2 g^3 (3 f g-e h)\right )}{8 h^4 \left (a h^2-b g h+c g^2\right )^{3/2}}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (f g^2-h (e g-d h)\right )}{2 h (g+h x)^2 \left (a h^2-b g h+c g^2\right )}-\frac{\sqrt{a+b x+c x^2} \left (2 h x \left (-2 a f h+2 b f g-c d h+c e g-\frac{3 c f g^2}{h}\right )-4 a h (3 f g-e h)-b h (d h+3 e g)+11 b f g^2-\frac{4 c g^2 (3 f g-e h)}{h}\right )}{4 h^2 (g+h x) \left (a h^2-b g h+c g^2\right )}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) (-b f h-2 c e h+6 c f g)}{2 \sqrt{c} h^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1650
Rule 812
Rule 843
Rule 621
Rule 206
Rule 724
Rubi steps
\begin{align*} \int \frac{\sqrt{a+b x+c x^2} \left (d+e x+f x^2\right )}{(g+h x)^3} \, dx &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{\int \frac{\left (\frac{1}{2} \left (-4 c d g+3 b e g+4 a f g-\frac{3 b f g^2}{h}+b d h-4 a e h\right )+\left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{(g+h x)^2} \, dx}{2 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}+\frac{\int \frac{\frac{1}{2} \left (2 (2 b g-2 a h) \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right )+b \left (3 b f g^2-b h (3 e g+d h)+4 h (c d g-a f g+a e h)\right )\right )-\frac{2 (6 c f g-2 c e h-b f h) \left (c g^2-b g h+a h^2\right ) x}{h}}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{4 h^2 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{(6 c f g-2 c e h-b f h) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{2 h^4}+\frac{\left (8 c^2 g^3 (3 f g-e h)-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (9 f g^2-3 e g h+d h^2\right )\right )+h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (3 e g+d h)\right )\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{8 h^4 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{(6 c f g-2 c e h-b f h) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c x}{\sqrt{a+b x+c x^2}}\right )}{h^4}-\frac{\left (8 c^2 g^3 (3 f g-e h)-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (9 f g^2-3 e g h+d h^2\right )\right )+h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (3 e g+d h)\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac{-b g+2 a h-(2 c g-b h) x}{\sqrt{a+b x+c x^2}}\right )}{4 h^4 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{(6 c f g-2 c e h-b f h) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 \sqrt{c} h^4}+\frac{\left (8 c^2 g^3 (3 f g-e h)-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (9 f g^2-3 e g h+d h^2\right )\right )+h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (3 e g+d h)\right )\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b g h+a h^2} \sqrt{a+b x+c x^2}}\right )}{8 h^4 \left (c g^2-b g h+a h^2\right )^{3/2}}\\ \end{align*}
Mathematica [A] time = 3.95224, size = 645, normalized size = 1.44 \[ \frac{-\frac{\frac{2 c \sqrt{a+x (b+c x)} \left (h^2 \left (-4 a^2 f h^2-4 a b h (e h-4 f g)+b^2 \left (d h^2+3 e g h-11 f g^2\right )\right )+c h \left (b \left (h (d h (h x-g)+e g (3 h x-7 g))+f g^2 (23 g-7 h x)\right )-2 a h (h (d h-3 e g+2 e h x)+f g (9 g-4 h x))\right )-2 c^2 \left (g h \left (d h^2 x+e g (h x-2 g)\right )+3 f g^3 (2 g-h x)\right )\right )}{h^2}+\frac{c \sqrt{h (a h-b g)+c g^2} \tanh ^{-1}\left (\frac{2 a h-b g+b h x-2 c g x}{2 \sqrt{a+x (b+c x)} \sqrt{h (a h-b g)+c g^2}}\right ) \left (h^2 \left (8 a^2 f h^2+4 a b h (e h-6 f g)+b^2 \left (15 f g^2-h (d h+3 e g)\right )\right )+4 c h \left (a h \left (d h^2-3 e g h+9 f g^2\right )+b g^2 (3 e h-10 f g)\right )+8 c^2 g^3 (3 f g-e h)\right )+4 \sqrt{c} \left (h (a h-b g)+c g^2\right )^2 \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right ) (-b f h-2 c e h+6 c f g)}{h^3}-\frac{2 c (a+x (b+c x))^{3/2} \left (-4 a h^2 (e h-2 f g)+b h \left (h (d h+3 e g)-7 f g^2\right )-2 c g h (d h+e g)+6 c f g^3\right )}{g+h x}}{8 \left (h (a h-b g)+c g^2\right )^2}-\frac{(a+x (b+c x))^{3/2} \left (2 f h (a h-b g)+c h (d h-e g)+3 c f g^2\right )}{2 (g+h x)^2 \left (h (a h-b g)+c g^2\right )}+\frac{f (a+x (b+c x))^{3/2}}{(g+h x)^2}}{c h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.285, size = 12139, normalized size = 27.1 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]